<?php


namespace app\service;


use app\model\Model;
use app\model\Tag;

class TagService
{
    public static function getTagTagList($param)
    {
        if(!empty($param['id'])){
            $ids = explode(',',$param['id']);
            $where[] = ['id','in',$ids];
        }
        $where = [
            ['seller_id','=',$param['seller_id']],
            ['website_id','=',$param['website_id']],
            ['is_recommend','=',$param['is_recommend']]
        ];
        $Tag = new Tag();

        if($param['is_page'] == 1){
            $data = $Tag -> getLimitCustomData($where,$param['sort'],$param['limit'],$param['field'])['data'];
        }else{
            $data = $Tag -> getCustomDataList($where,$param['limit'],$param['sort'],$param['field'])['data'];
        }
        return $data;
    }
}